Optimal. Leaf size=147 \[ -\frac {c (3 e f+5 d g) \sqrt {d+e x} \sqrt {f+g x}}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {\left (8 a e^2 g^2+c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{4 e^{5/2} g^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {966, 81, 65,
223, 212} \begin {gather*} \frac {\left (8 a e^2 g^2+c \left (3 d^2 g^2+2 d e f g+3 e^2 f^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{4 e^{5/2} g^{5/2}}-\frac {c \sqrt {d+e x} \sqrt {f+g x} (5 d g+3 e f)}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 81
Rule 212
Rule 223
Rule 966
Rubi steps
\begin {align*} \int \frac {a+c x^2}{\sqrt {d+e x} \sqrt {f+g x}} \, dx &=\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {\int \frac {\frac {1}{2} \left (4 a e^2 g-c d (3 e f+d g)\right )-\frac {1}{2} c e (3 e f+5 d g) x}{\sqrt {d+e x} \sqrt {f+g x}} \, dx}{2 e^2 g}\\ &=-\frac {c (3 e f+5 d g) \sqrt {d+e x} \sqrt {f+g x}}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {1}{8} \left (8 a+\frac {c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )}{e^2 g^2}\right ) \int \frac {1}{\sqrt {d+e x} \sqrt {f+g x}} \, dx\\ &=-\frac {c (3 e f+5 d g) \sqrt {d+e x} \sqrt {f+g x}}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {\left (8 a+\frac {c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )}{e^2 g^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {f-\frac {d g}{e}+\frac {g x^2}{e}}} \, dx,x,\sqrt {d+e x}\right )}{4 e}\\ &=-\frac {c (3 e f+5 d g) \sqrt {d+e x} \sqrt {f+g x}}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {\left (8 a+\frac {c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )}{e^2 g^2}\right ) \text {Subst}\left (\int \frac {1}{1-\frac {g x^2}{e}} \, dx,x,\frac {\sqrt {d+e x}}{\sqrt {f+g x}}\right )}{4 e}\\ &=-\frac {c (3 e f+5 d g) \sqrt {d+e x} \sqrt {f+g x}}{4 e^2 g^2}+\frac {c (d+e x)^{3/2} \sqrt {f+g x}}{2 e^2 g}+\frac {\left (8 a e^2 g^2+c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{4 e^{5/2} g^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.34, size = 123, normalized size = 0.84 \begin {gather*} \frac {c \sqrt {d+e x} \sqrt {f+g x} (-3 e f-3 d g+2 e g x)}{4 e^2 g^2}+\frac {\left (8 a e^2 g^2+c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {e} \sqrt {f+g x}}{\sqrt {g} \sqrt {d+e x}}\right )}{4 e^{5/2} g^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(305\) vs.
\(2(121)=242\).
time = 0.08, size = 306, normalized size = 2.08
method | result | size |
default | \(\frac {\left (4 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}\, c e g x +3 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c \,d^{2} g^{2}+2 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c d e f g +3 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c \,e^{2} f^{2}+8 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) a \,e^{2} g^{2}-6 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c d g -6 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c e f \right ) \sqrt {e x +d}\, \sqrt {g x +f}}{8 \sqrt {e g}\, g^{2} e^{2} \sqrt {\left (e x +d \right ) \left (g x +f \right )}}\) | \(306\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.77, size = 338, normalized size = 2.30 \begin {gather*} \left [\frac {{\left ({\left (3 \, c d^{2} g^{2} + 2 \, c d f g e + {\left (3 \, c f^{2} + 8 \, a g^{2}\right )} e^{2}\right )} \sqrt {g} e^{\frac {1}{2}} \log \left (d^{2} g^{2} + 4 \, {\left (d g + {\left (2 \, g x + f\right )} e\right )} \sqrt {g x + f} \sqrt {x e + d} \sqrt {g} e^{\frac {1}{2}} + {\left (8 \, g^{2} x^{2} + 8 \, f g x + f^{2}\right )} e^{2} + 2 \, {\left (4 \, d g^{2} x + 3 \, d f g\right )} e\right ) - 4 \, {\left (3 \, c d g^{2} e - {\left (2 \, c g^{2} x - 3 \, c f g\right )} e^{2}\right )} \sqrt {g x + f} \sqrt {x e + d}\right )} e^{\left (-3\right )}}{16 \, g^{3}}, -\frac {{\left ({\left (3 \, c d^{2} g^{2} + 2 \, c d f g e + {\left (3 \, c f^{2} + 8 \, a g^{2}\right )} e^{2}\right )} \sqrt {-g e} \arctan \left (\frac {{\left (d g + {\left (2 \, g x + f\right )} e\right )} \sqrt {g x + f} \sqrt {-g e} \sqrt {x e + d}}{2 \, {\left ({\left (g^{2} x^{2} + f g x\right )} e^{2} + {\left (d g^{2} x + d f g\right )} e\right )}}\right ) + 2 \, {\left (3 \, c d g^{2} e - {\left (2 \, c g^{2} x - 3 \, c f g\right )} e^{2}\right )} \sqrt {g x + f} \sqrt {x e + d}\right )} e^{\left (-3\right )}}{8 \, g^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + c x^{2}}{\sqrt {d + e x} \sqrt {f + g x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.16, size = 160, normalized size = 1.09 \begin {gather*} \frac {{\left (\sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \sqrt {g x + f} {\left (\frac {2 \, {\left (g x + f\right )} c e^{\left (-1\right )}}{g^{3}} - \frac {{\left (3 \, c d g^{6} e + 5 \, c f g^{5} e^{2}\right )} e^{\left (-3\right )}}{g^{8}}\right )} - \frac {{\left (3 \, c d^{2} g^{2} + 2 \, c d f g e + 3 \, c f^{2} e^{2} + 8 \, a g^{2} e^{2}\right )} e^{\left (-\frac {5}{2}\right )} \log \left ({\left | -\sqrt {g x + f} \sqrt {g} e^{\frac {1}{2}} + \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \right |}\right )}{g^{\frac {5}{2}}}\right )} g}{4 \, {\left | g \right |}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 20.13, size = 569, normalized size = 3.87 \begin {gather*} \frac {c\,\mathrm {atanh}\left (\frac {\sqrt {g}\,\left (\sqrt {d+e\,x}-\sqrt {d}\right )}{\sqrt {e}\,\left (\sqrt {f+g\,x}-\sqrt {f}\right )}\right )\,\left (3\,d^2\,g^2+2\,d\,e\,f\,g+3\,e^2\,f^2\right )}{2\,e^{5/2}\,g^{5/2}}-\frac {4\,a\,\mathrm {atan}\left (\frac {e\,\left (\sqrt {f+g\,x}-\sqrt {f}\right )}{\sqrt {-e\,g}\,\left (\sqrt {d+e\,x}-\sqrt {d}\right )}\right )}{\sqrt {-e\,g}}-\frac {\frac {\left (\sqrt {d+e\,x}-\sqrt {d}\right )\,\left (\frac {3\,c\,d^2\,e\,g^2}{2}+c\,d\,e^2\,f\,g+\frac {3\,c\,e^3\,f^2}{2}\right )}{g^6\,\left (\sqrt {f+g\,x}-\sqrt {f}\right )}-\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^3\,\left (\frac {11\,c\,d^2\,g^2}{2}+25\,c\,d\,e\,f\,g+\frac {11\,c\,e^2\,f^2}{2}\right )}{g^5\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^3}+\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^7\,\left (\frac {3\,c\,d^2\,g^2}{2}+c\,d\,e\,f\,g+\frac {3\,c\,e^2\,f^2}{2}\right )}{e^2\,g^3\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^7}-\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^5\,\left (\frac {11\,c\,d^2\,g^2}{2}+25\,c\,d\,e\,f\,g+\frac {11\,c\,e^2\,f^2}{2}\right )}{e\,g^4\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^5}+\frac {\sqrt {d}\,\sqrt {f}\,\left (32\,c\,d\,g+32\,c\,e\,f\right )\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^4}{g^4\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^4}}{\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^8}{{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^8}+\frac {e^4}{g^4}-\frac {4\,e\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^6}{g\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^6}-\frac {4\,e^3\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{g^3\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^2}+\frac {6\,e^2\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^4}{g^2\,{\left (\sqrt {f+g\,x}-\sqrt {f}\right )}^4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________